import axios from '@/utils/request';


/**
 * 获取库存实时账查询分页列表
 */
 export async function QueryStockByCondition(params) {
    const res = await axios.post('/Stock/QueryStockByCondition',params);
    if (res.data.code === 200) {
        return res.data.data;
    }
    return Promise.reject(new Error(res.data.msg));
}

/**
 * 查询锁定数量业务单据
 */
export async function QueryLockStockByCondition(params) {
    const res = await axios.post('/Stock/QueryLockStockByCondition',params);
    if (res.data.code === 200) {
        return res.data.data;
    }
    return Promise.reject(new Error(res.data.msg));
}

/**
 * 根据仓库id和产品Id获取库存数据集
 */
export async function QueryStockByProductIdAndWareHouseId(params) {
    const res = await axios.post('/Stock/QueryStockByProductIdAndWareHouseId',params);
    if (res.data.code === 200) {
        return res.data.data;
    }
    return Promise.reject(new Error(res.data.msg));
}






